package test8;

public class Boat {
    //现在是父类：船类Boat
    private int registrationNo;//注册号
    private double length;//长
    private String manufacturer;//制造商
    private int year;//年

    public Boat(int registrationNo,double length,String manufacturer,int year){
        this.registrationNo = registrationNo;
        this.length = length;
        this.manufacturer = manufacturer;
        this.year = year;
    }
    public String toString(){
        return "船的注册号为 "+registrationNo+",船的长为 "+length+",船的制造商为 "+manufacturer+",船的制造年份为 "+year;
    }

}
